<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>修改赛事</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script type="text/javascript" src="../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/base.js"></script>
    <script src="../js/jquery.min.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        .juese {
            text-align: center;
            width: 90%;
            border: 1px solid #ccc;
            margin: 20px auto;
        }

        .juese th {
            text-align: center;
            background: #fff;
        }

        .layui-row .juese .layui-table td,
        .layui-row .juese .layui-table th {
            font-size: 14px;
        }

        .layui-col-md4 label {
            width: 30%;
            padding: 9px 0;
            font-size: 14px;
            color: #999;
        }

        .layui-col-md4 div {
            line-height: 38px;
            width: 70%;
            text-align: left;
            font-size: 14px;
            box-sizing: border-box;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            padding-left: 10px;
        }

        .layui-col-md3 label {
            width: 30%;
            padding: 9px 0;
            font-size: 14px;
            color: #999;
        }

        .layui-col-md3 div {
            line-height: 38px;
            width: 70%;
            text-align: left;
            font-size: 14px;
            box-sizing: border-box;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            padding-left: 10px;
        }

        .layui-col-md5 label {
            width: 30%;
            padding: 9px 0;
            font-size: 14px;
            color: #999;
        }

        .layui-col-md5 div {
            line-height: 38px;
            width: 70%;
            text-align: left;
            font-size: 14px;
            box-sizing: border-box;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            padding-left: 10px;
        }

        .layui-col-md6 label {
            width: 30%;
            padding: 9px 0;
            font-size: 14px;
            color: #999;
        }

        .layui-col-md6 div {
            line-height: 38px;
            width: 70%;
            text-align: left;
            font-size: 14px;
            box-sizing: border-box;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            padding-left: 10px;
        }

        .layui-input-inline {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    </style>
</head>

<body>
    <div class="layui-fluid">
        <div class="layui-row">
            <form class="layui-form">
                <div style="text-align: center;font-size: 16px;">个人信息</div>
                <div class="juese layui-row">
                    <div class="layui-col-md10">
                        <div style="padding:20px;overflow: hidden;">
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">用户昵称：</label>
                                <div class="layui-input-inline" id="nickName">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">真实姓名：</label>
                                <div class="layui-input-inline" id="name">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">性别：</label>
                                <div class="layui-input-inline" id="sex">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">出生日期：</label>
                                <div class="layui-input-inline" id="birthDay">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 identity" style="display: none;">
                                <label class="layui-form-label">身份：</label>
                                <div class="layui-input-inline" id="identity">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 teamName" style="display: none;">
                                <label class="layui-form-label">球队：</label>
                                <div class="layui-input-inline" id="teamName">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">证件类型：</label>
                                <div class="layui-input-inline" id="documentType">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">证件号码：</label>
                                <div class="layui-input-inline" id="documentNumber">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">通信地址：</label>
                                <div class="layui-input-inline" id="address">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">城市：</label>
                                <div class="layui-input-inline" id="city">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">地区：</label>
                                <div class="layui-input-inline" id="area">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">个人简介：</label>
                                <div class="layui-input-inline" id="introduction" style="white-space: normal;">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md2">
                        <div style="width: 118px;height:138px;margin-top: 40px;">
                            <img id="headPhoto" style="width: 100%;height:100%;" src="" alt="">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" style="text-align: center">
                    <button type="button" class="layui-btn" onclick="openChange()">修改信息</button>
                </div>
            </form>
        </div>
    </div>
</body>
<script>
    var nickName, name, sex, birthDay, identity, teamName, documentType, documentType, documentType, documentNumber,
        address, city, area, introduction, headPhoto, teamId, ID


    function openChange() {
        layui.use(["layer"], function () {
            layer.open({
                content: "changePerInfo.html",
                type: 2, //打开的窗口的类型
                area: ["100%", "100%"],
                title: "修改个人信息",
                // btn: ['确认', '取消'],//开启显示按钮功能
                // btnAlign: 'c',//居中显示按钮
                // shade:true,
                shadeClose: true,
                success: function (layero, index) {
                    // console.log(data)//获取点击行的数据,获取打开的iframe
                    var body = layer.getChildFrame('body', index);
                    var iframeWin = window[layero.find('iframe')[0]['name']];
                    iframeWin.ID = ID
                    body.find("#nickName").val(nickName)
                    body.find("#name").val(name)
                    if (sex == "男") {
                        body.find("#sex").val("1")
                    } else if (sex == "女") {
                        body.find("#sex").val("2")
                    } else {
                        body.find("#sex").val("")
                    }
                    body.find("#birthDay").val(birthDay)
                    if (identity !== "false") {
                        body.find(".identity").css("display", "block")
                        // if (identity == "球员") {
                        //     body.find("#identity").val("3")
                        //     body.find(".teamName").css("display", "block")
                        //     iframeWin.teamId = teamId
                        // } else if (identity == "教练员") {
                        //     body.find("#identity").val("1")
                        // } else if (identity == "裁判员") {
                        //     body.find("#identity").val("2")
                        // } else {
                        //     body.find("#identity").val("")
                        // }
                    } else {
                        iframeWin.perOrGroup = "false"
                    }


                    body.find("#documentType").val(documentType)
                    body.find("#documentNumber").val(documentNumber)
                    body.find("#address").val(address)
                    body.find("#s_province").val(city)
                    iframeWin.change(1)
                    body.find("#s_city").val(area)
                    body.find("#introduction").val(introduction)
                    body.find("#updateHeadImg").attr("src", headPhoto)
                    iframeWin.frames.layui.form.render("select");
                }
            })
        })
    }
</script>

</html>